﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>

    <script src="../../linq.js"></script>

</head>
<body>
    <script type="text/javascript">


        var lists = [];
        var entity1= {
            CorporationCode : "Q000",
            CorporarionName : "ASDF"
        }
        var entity2 = {
            CorporationCode: "Q000",
            CorporarionName: "ASDF"
        }
        lists.push(entity1, entity2);


        var array = ["CorporationCode","CorporarionName"];
        array.forEach(function (element) {
            var ss = Enumerable.From(lists).Select("$." + element).Distinct().ToArray();
            console.log(ss.length);
        });
        
    </script>
</body>
</html>